<template>
  <div>
    <el-container>
      <el-aside :width="isCollapse ? '64px' : '200px'"
        ><common-aside style="position: fixed; top: 0"></common-aside
      ></el-aside>
      <el-container>
        <el-header>
          <common-header></common-header>
        </el-header>
        <CommonTag />
        <el-main
          ><!-- 子路由出口 -->
          <router-view></router-view
        ></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import CommonAside from "../components/CommonAside.vue";
import CommonHeader from "../components/CommonHeader.vue";
import CommonTag from "../components/CommonTag.vue";
export default {
  components: {
    CommonAside,
    CommonHeader,
    CommonTag,
  },
  computed: {
    isCollapse() {
      return this.$store.state.tab.collapse;
    },
  },
};
</script>

<style lang="less" scoped>
.el-header {
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.el-main {
  padding-top: 0;
}
</style>
